package com.example.fourcomponentsdemo.broadcastreceiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

/**
 * Created by tangjiangxu on 10/24/17.
 */

public class MyReceiver extends BroadcastReceiver{
    private static final String TAG = "MyReceiver";
    @Override
    public void onReceive(Context context, Intent intent) {
        //onReceive函数不能做耗时操作，参考值：10s以内
        Log.d(TAG, "onReceive action:" + intent.getAction());
        String action = intent.getAction();
        //to do something
    }


}
